<template>
  <video :src="url" controls style="width: 100%; height: 200px;" />
</template>

<script lang="ts" setup>
import { computed } from 'vue';
import type { UploadUserFile } from 'element-plus';

const props = defineProps<{ file: UploadUserFile }>();
const url = computed(() => props.file.url || URL.createObjectURL(props.file.raw!));
</script>
